package com.wanxi.tool.domain.result;

public enum ResultCode implements IErrorCode {
    SUCCESS(200, "操作成功"),
    FAILED(500, "操作失败"),
    VALIDATE_FAILED(404, "参数检验失败"),
    UNAUTHORIZED(401, "暂未登录或token已经过期"),
    FORBIDDEN(403, "没有相关权限"),
    ADD_USERINFO_FAILED(407, "邮箱或手机已存在"),
    ADD_FAILED_USERNAME(407, "账号已存在"),
    DELETE_SUCCESS(201,"删除成功"),
    DELETE_FAILED(501,"删除失败"),
    UPDATE_SUCCESS(202,"修改成功"),
    UPDATE_FAILED(502,"修改失败"),
    ADD_SUCCESS(203,"添加成功"),
    ADD_FAILED(503,"添加失败");
    private long code;
    private String message;

    private ResultCode(long code, String message) {
        this.code = code;
        this.message = message;
    }

    public long getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}